package com.formssi.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@ExcelTarget("UserExcel")
public class UserExcel implements Serializable {

    @Excel(name = "编号", width = 25,orderNum = "1")
    private Integer id;
    @Excel(name = "姓名", width = 25,orderNum = "2")
    @NotNull(message = "姓名不能为空！")
    private String name;

    @Range(min=0, max=150)
    @Excel(name = "年龄", width = 25,orderNum = "3")
    private Integer age;

    @Length(min=11, max=11)
    @Excel(name = "电话", width = 25,orderNum = "4")
    private String phone;
    @Excel(name = "性别", width = 25,orderNum = "5")
    private String sex;
    @Excel(name = "出生日期", width = 25,format = "yyyy-MM-dd",orderNum = "6")
    private Date birthday;
    @Excel(name = "地址", width = 85,orderNum = "7")
    private String address;

    @Email
    @Excel(name = "email", width = 25,orderNum = "8")
    private String email;
    @Excel(name = "毕业院校", width = 25,orderNum = "9")
    private String college;
    @Excel(name = "专业", width = 25,orderNum = "10")
    private String major;
    @Excel(name = "创建时间", width = 25,format = "yyyy-MM-dd HH:mm:ss",orderNum = "11")
    private Date instData;
    @Excel(name = "修改时间", width = 25,format = "yyyy-MM-dd HH:mm:ss",orderNum = "12")
    private Date modiTime;

}
